import  upyun
# 新建又拍云实例
up = upyun.UpYun('mdsave',username='ljq',password='m3QsiAaLhMvB8owYEwdl1l2atviBVF3U')
# 上传文件
# up.put('/upyun_test.txt','qwewqrwq',)
# 文件流操作(节省内存)
# with open('./test.png','rb')as f:
#     # 上传操作
#     res=up.put('/test.png',f,checksum=True)
# 目录操作
# up.mkdir('/upyun_test/')
# 移动文件
# up.move('/test.png','/upyun_test/test.png')
# 复制文件
# up.copy('/upyun_test.txt','/upyun_test/upyun_test.txt')
# 断点续传
# with open(r'G:\百度网盘\wlop\2019年7月\新建文件夹\p1080x2340.mp4','rb')as f:
#     up.put('/upyun_test/1.mp4',f,checksum=True,need_resume=True)

# 下载文件
# res=up.get('/upyun_test/test.png')
# print(res)
# 删除文件
# up.delete('/upyun_test/test.png')
